package aaexcercise.chap5.p5.p4;

/**
 * Created by Administrator on 2017/4/12.
 */
public class WiseWolf {
    private String name  = "gaylotte";
    private void printName(){
        System.out.println("name:"+name);
    }

    class Yenefa{
        //内部类自由访问外部类私有域，并且改变外部了的私有域对象
        void changeWolf(){
            name = "triss";
            printName();
        }
    }

    void invokeInner(){
        Yenefa ye = new Yenefa();
        printName();
        ye.changeWolf();
    }

    public static void main(String[] args) {
        new WiseWolf().invokeInner();
    }
}
